extends CharacterBody2D


@export var barrier_speed :int = 10
signal crashed

func _physics_process(delta: float) -> void:
	self.velocity.x -= barrier_speed

	move_and_slide()
	if self.position.x == -110:
		self.paused = true

func _on_area_2d_body_entered(body: Node2D) -> void:
	emit_signal("crashed")
